#include <stdio.h>

int main(){
    int arr[] = {8,4,1,3,2,7,5,9,6};
    int n = sizeof(arr)/sizeof(arr[0]);
    for(int i=1;i<n;i++){
        for(int j=0;j<n-i;j++){
            if(arr[j]>arr[j+1]){
                int temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
        }
    }
    for(int i=0;i<n;i++){printf("%d ",arr[i]);}

    return 0;
}